// Just a mock data

const visitorRoutes = [
  { path: '*', redirect: '/404', hidden: true }
]

const adminRoutes = [
  {
    path: '/userManage',
    component: 'Layout',
    children: [
      {
        path: 'index',
        component: 'userManage',
        name: 'UserManage',
        meta: { title: '用户管理', icon: 'user' }
      }
    ]
  },
  {
    path: '/jurisdiction',
    component: 'Layout',
    meta: {
      title: '权限管理',
      icon: 'documentation'
    },
    children: [
      {
        path: 'roles',
        component: 'jurisdiction_roles',
        name: 'Roles',
        meta: { title: '角色列表', icon: 'user' }
      },
      {
        path: 'rights',
        component: 'jurisdiction_rights',
        name: 'Rights',
        meta: { title: '权限列表', icon: 'user' }
      }
    ]
  },
  {
    path: '/article',
    component: 'Layout',
    name: 'Article',
    meta: {
      title: '文章管理',
      icon: 'documentation'
    },
    children: [
      {
        path: 'list',
        component: 'article_list',
        name: 'ArticleList',
        meta: { title: '文章列表', icon: 'list' }
      },
      {
        path: 'create',
        component: 'article_create',
        name: 'CreateArticle',
        meta: { title: '创建文章', icon: 'edit' }
      }
    ]
  },
  {
    path: '/category',
    component: 'Layout',
    name: 'Category',
    meta: { title: '分类管理', icon: 'component' },
    children: [
      {
        path: 'index',
        component: 'category_list',
        name: 'Index',
        meta: { title: '分类列表', icon: 'list' }
      },
      {
        path: 'tag',
        component: 'category_tag',
        name: 'Tag',
        meta: { title: '标签列表', icon: 'edit' }
      }
    ]
  },
  // {
  //   path: '/comments',
  //   component: 'Layout',
  //   children: [
  //     {
  //       path: 'index',
  //       component: 'comments',
  //       name: 'Comments',
  //       meta: { title: '文章评论', icon: 'documentation' }
  //     }
  //   ]
  // },
  // {
  //   path: '/newMsg',
  //   component: 'Layout',
  //   children: [
  //     {
  //       path: 'index',
  //       component: 'newMsg',
  //       name: 'NewMsg',
  //       meta: { title: '新消息', icon: 'documentation' }
  //     }
  //   ]
  // },
  {
    path: '/msgBoard',
    component: 'Layout',
    children: [
      {
        path: 'index',
        component: 'msgBoard',
        name: 'MsgBoard',
        meta: { title: '留言板', icon: 'documentation' }
      }
    ]
  },
  {
    path: '/personalCenter',
    component: 'Layout',
    children: [
      {
        path: 'index',
        component: 'personalCenter',
        name: 'PersonalCenter',
        meta: { title: '个人中心', icon: 'documentation' }
      }
    ]
  },
  { path: '*', redirect: '/404', hidden: true }
]

const editorRoutes = [
  {
    path: '/article',
    component: 'Layout',
    name: 'Article',
    meta: {
      title: '文章管理',
      icon: 'documentation'
    },
    children: [
      {
        path: 'list',
        component: 'article_list',
        name: 'ArticleList',
        meta: { title: '文章列表', icon: 'list' }
      },
      {
        path: 'create',
        component: 'article_create',
        name: 'CreateArticle',
        meta: { title: '创建文章', icon: 'edit' }
      }
    ]
  },
  {
    path: '/category',
    component: 'Layout',
    name: 'Category',
    meta: { title: '分类管理', icon: 'component' },
    children: [
      {
        path: 'index',
        component: 'category_list',
        name: 'Index',
        meta: { title: '分类列表', icon: 'list' }
      },
      {
        path: 'tag',
        component: 'category_tag',
        name: 'Tag',
        meta: { title: '标签列表', icon: 'edit' }
      }
    ]
  },
  // {
  //   path: '/comments',
  //   component: 'Layout',
  //   children: [
  //     {
  //       path: 'index',
  //       component: 'comments',
  //       name: 'Comments',
  //       meta: { title: '文章评论', icon: 'documentation' }
  //     }
  //   ]
  // },
  // {
  //   path: '/newMsg',
  //   component: 'Layout',
  //   children: [
  //     {
  //       path: 'index',
  //       component: 'newMsg',
  //       name: 'NewMsg',
  //       meta: { title: '新消息', icon: 'documentation' }
  //     }
  //   ]
  // },
  {
    path: '/msgBoard',
    component: 'Layout',
    children: [
      {
        path: 'index',
        component: 'msgBoard',
        name: 'MsgBoard',
        meta: { title: '留言板', icon: 'documentation' }
      }
    ]
  },
  {
    path: '/personalCenter',
    component: 'Layout',
    children: [
      {
        path: 'index',
        component: 'personalCenter',
        name: 'PersonalCenter',
        meta: { title: '个人中心', icon: 'documentation' }
      }
    ]
  },

  { path: '*', redirect: '/404', hidden: true }
]
// 路由
const roles = [
  {
    roleId: 1,
    key: 'admin',
    roleName: '超级管理员',
    roleDesc: 'Super Administrator. Have access to view all pages.',
    routes: adminRoutes
  },
  {
    roleId: 2,
    key: 'editor',
    roleName: '作者',
    roleDesc: 'Normal Editor. Can see all pages except permission page',
    routes: editorRoutes// just a mock
  },
  {
    roleId: 3,
    key: 'visitor',
    roleName: '浏览者',
    roleDesc: 'Normal visitor. Can see all pages except permission page',
    routes: visitorRoutes// just a mock
  }
]
module.exports = roles
